package com.ljkj.cordial.lengthtcpheartbeat;

import android.app.KeyguardManager;
import android.content.Context;

public class OnScreenUtil {
    /**
     * 屏幕是否解锁
     *
     * @param context
     * @return
     */
    public static boolean isOpen(Context context) {
        KeyguardManager mKeyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
        boolean flag = mKeyguardManager.inKeyguardRestrictedInputMode();
        return flag ? false : true;
    }
}
